#include <Frame.hpp>



long Frame::siFrameAllId = 0;// 全局的帧id初始化给为0

Frame::Frame()
{
    mlId = siFrameAllId++;
}

Frame::Frame(cv::Mat _pic){
    _pic.copyTo(mPic);
    mlId = siFrameAllId++;
}

Frame::Frame(cv::Mat & inPic, std::shared_ptr<EASY::ORBextractor> inORBextractor){
    mlId = siFrameAllId++;
    mPic = inPic;
    mspORBextractor = inORBextractor;
}
Frame::Frame(cv::Mat & inPic, double stamp, std::shared_ptr<EASY::ORBextractor> inORBextractor){
    mlId = siFrameAllId++;
    mPic = inPic;
    mStamp = stamp;
    mspORBextractor = inORBextractor;
}
Frame::~Frame()
{
    
}

void Frame::calculateOrb(void){
    // 提取orb特征点
    (*mspORBextractor)(mPic,		//待提取特征点的图像
                    cv::Mat(),		//掩摸图像, 实际没有用到
                    mvKeys,			//输出变量，用于保存提取后的特征点
                    mDescriptors);	//输出变量，用于保存特征点的描述子
}